﻿
using System ;

namespace MskEdit.Dxf.Backend
{

    internal class DxfProbeReader
    {
        internal static bool NextExists( string[] allLines, int lineNo ) {
            
            if ( lineNo >= allLines.Length )
                return false ;
            
            return true ;
        }


        internal static bool NextIs( string expected, string[] allLines, int lineNo ) {
            
            if ( NextExists( allLines, lineNo ) )
                return false ;
                
            if ( ! expected.Equals( allLines[lineNo] ) )
                return false ;
            
            return true ;
        }
        
        
        internal static bool SkipIfNextIs( string expected, string [] allLines, ref int lineNo ) {
            
            if ( ! NextIs( expected, allLines, lineNo ) )
                return false ;
                
            ++lineNo ;
            
            return true ;
        }

    }
}
